import { Col } from 'antd';
import { localFieldConfig } from './Age.config';
export { localFieldConfig } from './Age.config';
import FormItemInput from '@/pages/Myantd/Form/FormItemInput';
import VLD from '@/pages/Myantd/Form/Rule/VLD';
const Age = ({ FieldConfig, layout, form }: any) => {
  const fieldProps = FieldConfig?.['field-props'];

  const Rule = {
    VLD_00001: VLD.VLD_00001(form.getFieldValue(FieldConfig?.field)),
  };

  return (
    <Col {...layout}>
      <FormItemInput
        labelName={FieldConfig?.field}
        disabled={fieldProps?.disabled === 'Y'}
        required={fieldProps?.required === 'Y'}
        Rules={fieldProps?.rules.map((rule: any) => Rule[rule])}
      />
    </Col>
  );
};

Age.displayName = localFieldConfig.field;
export default Age;
